<template>
  <el-card>
    <el-row>
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item><a href="#">消息管理</a></el-breadcrumb-item>
        <el-breadcrumb-item>发布通告</el-breadcrumb-item>
      </el-breadcrumb>
    </el-row>
    <div class="message_box">
      <div class="message">
        <h3><el-tag  size="large">发布通告</el-tag></h3>
        <textarea name="" id="" cols="30" rows="10" v-model="Anouncement.noticeMessage"></textarea>
        <el-button type="primary" @click="noticeConfirm">发布</el-button>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  data () {
    return {
      Anouncement: {
        noticeMessage: ''
      }

    }
  },
  methods: {
    noticeConfirm () {
      this.$http.post('/api/notice/message', this.Anouncement)
        .then(res => {
          if (res.status !== 200) {
            this.$message.error('发布通告失败')
          }
          this.$message.success('发布通告成功')
        })
    }
  }
}
</script>

<style scoped>
.message_box{
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  background-color: lightpink;
  opacity: .7;
}
h3{
  text-align: center;
  padding: 10px 0px;
}
h3 .el-tag{
  font-size: 22px;

}
.message{
  width: 700px;
  height: 500px;
  box-sizing: border-box;
  background-color: lightpink;
  z-index: 20;
}
.message .el-input{
  width: 100%;
  height: 400px !important;
}
.el-button{
  display: block;
  width: 200px;
  margin: 0 auto;

}
textarea{
  width: 100%;
  height: 400px;
  border: 1px solid #f40;
  margin-top: 10px;
  font-size: 14px;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  color: gold;
  padding: 5px 8px;
  box-sizing: border-box;
  margin-bottom: 20px;
}
</style>
